<?php

namespace App\Admin\Http\Requests;

class RoleMenuRequest extends Request
{
    /**
     * 用户请求认证
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * 设置请求验证规则
     *
     * @return array
     */
    public function rules()
    {
        $rules = [
            'role_id' => 'required|integer',
            'menu_id' => 'required|integer',
        ];

        return $rules;
    }

    /**
     * 翻译验证属性
     *
     * @return array
     */
    public function attributes()
    {
        return [
            'role_id' => '权限编号',
            'menu_id' => '菜单编号',
        ];
    }
}
